﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Environment_Updater {
    class WorldVector {
        private float x, y, z;

        public WorldVector() {
            this.x = this.y = this.z = 0;
        }

        public WorldVector(float x, float y, float z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        public WorldVector times(float s) { // scale
            return new WorldVector(this.x * s, this.y * s, this.z * s);
        }

        public WorldVector plus(WorldVector v) {
            return new WorldVector(this.x + v.x, this.y + v.y, this.z + v.z);
        }

        public override String ToString() {
            return "[X: " + String.Format("{0:0.00}", this.x) + ", Y: " + String.Format("{0:0.00}", this.y) + ", Z: " + String.Format("{0:0.00}", this.z) + "]";
        }

        public float X {
            get { return this.x; }
            set { this.x = value; }
        }

        public float Y {
            get { return this.y; }
            set { this.y = value; }
        }

        public float Z {
            get { return this.z; }
            set { this.z = value; }
        }
    }
}
